import Vue from 'vue'
import App from './App'
import uView from "uview-ui";
import './main.css';
import SliderVerificationCode from 'slider-verification-code';
import 'slider-verification-code/lib/slider-verification-code.css';
import crypto from './utils/crypto';
import VueCookies from 'vue-cookies'
import VueLazyload from 'vue-lazyload'
 
Vue.use(VueLazyload, {
  preLoad: 1.3,
  error: '../../static/error.png',
  loading: '../../static/loading.gif',
  attempt: 1
})
Vue.use(SliderVerificationCode);
Vue.use(uView);
Vue.use(VueCookies)
// 全局cookie失效时间:3day
// Vue.$cookies.config('3d')
Vue.config.productionTip = false
Vue.prototype.$crypto = crypto;
App.mpType = 'app'

const app = new Vue({
    ...App
})
import httpApi from '@/common/http.api.js'
Vue.use(httpApi, app)
// http拦截器，此为需要加入的内容，如果不是写在common目录，请自行修改引入路径
import httpInterceptor from '@/common/http.interceptor.js'
// 这里需要写在最后，是为了等Vue创建对象完成，引入"app"对象(也即页面的"this"实例)
Vue.use(httpInterceptor, app);
app.$mount()
